package com.zqq.message.service.impl

import com.zqq.baselibrary.ext.convert
import com.zqq.message.service.MessageService
import com.zqq.message.service.bean.Message
import com.zqq.message.service.repository.MessageRepository
import rx.Observable
import javax.inject.Inject

/**
 * 消息业务层
 * @author zqq on 2018/8/6
 */
class MessageServiceImpl @Inject constructor() : MessageService {

    @Inject
    lateinit var repository: MessageRepository

    /**
     * 获取消息列表
     */
    override fun getMessageList(): Observable<MutableList<Message>?> {
        return repository.getMessageList()
                .convert()
    }

}